#include <setjmp.h>
#include <stdio.h>

jmp_buf buf;

void banana()
{
	printf("in banana() \n");
	longjmp(buf, 1);
	// 以下代码不会被执行
	printf("you 11 never see this, because i longjmp'd\n");
}

int main()
{
	if(setjmp(buf))
		printf("back in main\n");
	else
	{
		printf("first time through\n");
		banana();
	}

	 if(setjmp(buf))
                printf("back in main\n");
        else
        {
                printf("first time through\n");
                banana();
        }


	return 0;
}
